++        defCompatibleWith( _armv7hl,  _noarch,_armv3l,_armv4l,_
>
> armv4tl,_armv5l,_armv5tel,_armv5tejl,_armv6l,_armv7l );


armv7hl's not compatible with  armv3l,_armv4l,_
>
> armv4tl,_armv5l,_armv5tel,_armv5tejl,_armv6l,_armv7l

BR
Carsten  Munk


2010/12/20 Zhang Qiang <[email protected]>

> Hi,
> I have made the following changes to libzypp in project
> devel:packagemanagement. Please review and accept ASAP.
>
> Thank You,
> Zhang Qiang
>
> [This message was auto-generated]
>
> ---
>
> Request #11061:
>
>  submit:
> home:xiaoqiang:branches:devel:packagemanagement/libzypp(r17)(cleanup) ->
> devel:packagemanagement/libzypp
>
>
> Message:
>    a
>
> State:   new          2010-12-20T03:32:04 xiaoqiang
> Comment: None
>
>
>
> changes files:
> --------------
> --- libzypp.changes
> +++ libzypp.changes
> @@ -0,0 +1,6 @@
> +* Mon Dec 20 2010 Zhang Qiang <[email protected]> - 8.1.0
> +- Add MeeGo-resume-download.patch to support resume/re-start
> +  download packages, this patch can support to implement FEA#9355
> +- Add MeeGo-Add-armv7hl-and-armv7nhl-architecture.patch to support
> +  two arm architecture, fix BMC#11484
> +
>
> new:
> ----
>  MeeGo-Add-armv7hl-and-armv7nhl-architecture.patch
>  MeeGo-resume-download.patch
>
> spec files:
> -----------
> --- libzypp.spec
> +++ libzypp.spec
> @@ -24,6 +24,7 @@
>  BuildRequires:  ruby
>  BuildRequires:  expat-devel
>  BuildRequires:  dbus-glib-devel glib2-devel popt-devel rpm-devel
> +BuildRequires: libproxy-devel
>  Requires:       gnupg2
>  Requires:       satsolver-tools
>
> @@ -33,6 +34,8 @@
>  Patch3:                use_gpg2.patch
>  Patch4:         meego-enable-proxy.patch
>  Patch5:         meego-check-products-dir-while-using-rpmdb2solv.patch
> +Patch6:         MeeGo-resume-download.patch
> +Patch7:         MeeGo-Add-armv7hl-and-armv7nhl-architecture.patch
>
>  %description
>  Package, Patch, Pattern, and Product Management
> @@ -81,12 +84,23 @@
>  %patch3 -p1
>  %patch4 -p1
>  %patch5 -p1
> +%patch6 -p1
> +%patch7 -p1
>
>  %build
>  mkdir build
>  cd build
>  export CFLAGS="$RPM_OPT_FLAGS"
>  export CXXFLAGS="$CFLAGS"
> +MOZ_OPT_FLAGS=$(echo $RPM_OPT_FLAGS | %{__sed} -e 's/-O2//' -e 's/-Wall//'
> -e 's/-Os//')
> +export RPM_OPT_FLAGS=$MOZ_OPT_FLAGS
> +
> +MOZ_OPT_FLAGS=$(echo $CFLAGS| %{__sed} -e 's/-O2//' -e 's/-Wall//' -e
> 's/-Os//')
> +export CFLAGS=$MOZ_OPT_FLAGS
> +
> +MOZ_OPT_FLAGS=$(echo $CXXFLAGS| %{__sed} -e 's/-O2//' -e 's/-Wall//' -e
> 's/-Os//')
> +export CXXFLAGS=$MOZ_OPT_FLAGS
> +
>  cmake -DCMAKE_INSTALL_PREFIX=%{prefix} \
>       -DDOC_INSTALL_DIR=%{_docdir} \
>       -DLIB=%{_lib} \
>
> other changes:
> --------------
>
> ++++++ MeeGo-Add-armv7hl-and-armv7nhl-architecture.patch (new)
> --- MeeGo-Add-armv7hl-and-armv7nhl-architecture.patch
> +++ MeeGo-Add-armv7hl-and-armv7nhl-architecture.patch
> +diff -uNr libzypp-8.1.0/zypp/Arch.cc libzypp-8.1.0.new/zypp/Arch.cc
> +--- libzypp-8.1.0/zypp/Arch.cc 2010-08-06 00:32:16.000000000 +0800
> ++++ libzypp-8.1.0.new/zypp/Arch.cc     2010-12-20 16:31:19.541305043 +0800
> +@@ -187,6 +187,8 @@
> +     DEF_BUILTIN( sparcv8 );
> +     DEF_BUILTIN( sparc );
> +
> ++    DEF_BUILTIN( armv7nhl );
> ++    DEF_BUILTIN( armv7hl );
> +     DEF_BUILTIN( armv7l );
> +     DEF_BUILTIN( armv6l );
> +     DEF_BUILTIN( armv5tejl );
> +@@ -317,6 +319,8 @@
> +         defCompatibleWith( _armv5tejl,
>  _noarch,_armv3l,_armv4l,_armv4tl,_armv5l,_armv5tel );
> +         defCompatibleWith( _armv6l,
> _noarch,_armv3l,_armv4l,_armv4tl,_armv5l,_armv5tel,_armv5tejl );
> +         defCompatibleWith( _armv7l,
> _noarch,_armv3l,_armv4l,_armv4tl,_armv5l,_armv5tel,_armv5tejl,_armv6l );
> ++        defCompatibleWith( _armv7hl,
>  _noarch,_armv3l,_armv4l,_armv4tl,_armv5l,_armv5tel,_armv5tejl,_armv6l,_armv7l
> );
> ++        defCompatibleWith( _armv7nhl,
> _noarch,_armv3l,_armv4l,_armv4tl,_armv5l,_armv5tel,_armv5tejl,_armv6l,_armv7l,_armv7hl
> );
> +         //
> +         defCompatibleWith( _sh3,      _noarch );
> +         //
> +@@ -422,6 +426,8 @@
> +   const Arch Arch_sparcv8( _sparcv8 );
> +   const Arch Arch_sparc( _sparc );
> +
> ++  const Arch Arch_armv7nhl( _armv7nhl );
> ++  const Arch Arch_armv7hl( _armv7hl );
> +   const Arch Arch_armv7l( _armv7l );
> +   const Arch Arch_armv6l( _armv6l );
> +   const Arch Arch_armv5tejl( _armv5tejl );
> +diff -uNr libzypp-8.1.0/zypp/Arch.h libzypp-8.1.0.new/zypp/Arch.h
> +--- libzypp-8.1.0/zypp/Arch.h  2010-08-06 00:32:16.000000000 +0800
> ++++ libzypp-8.1.0.new/zypp/Arch.h      2010-12-20 16:31:59.001574385 +0800
> +@@ -212,6 +212,10 @@
> +   extern const Arch Arch_sparc;
> +
> +   /** \relates Arch */
> ++  extern const Arch Arch_armv7nhl;
> ++  /** \relates Arch */
> ++  extern const Arch Arch_armv7hl;
> ++  /** \relates Arch */
> +   extern const Arch Arch_armv7l;
> +   /** \relates Arch */
> +   extern const Arch Arch_armv6l;
> +diff -uNr libzypp-8.1.0/zypp/parser/yum/schema/common-inc.rnc
> libzypp-8.1.0.new/zypp/parser/yum/schema/common-inc.rnc
> +--- libzypp-8.1.0/zypp/parser/yum/schema/common-inc.rnc        2010-08-06
> 00:32:16.000000000 +0800
> ++++ libzypp-8.1.0.new/zypp/parser/yum/schema/common-inc.rnc    2010-12-20
> 16:36:41.668574373 +0800
> +@@ -31,6 +31,8 @@
> +             | "armv5tel"
> +             | "armv7el"
> +             | "armv7l"
> ++            | "armv7hl"
> ++            | "armv7nhl"
> +             | "athlon"
> +             | "i386"
> +             | "i486"
> +diff -uNr libzypp-8.1.0/zypp/parser/yum/schema/common-inc.rng
> libzypp-8.1.0.new/zypp/parser/yum/schema/common-inc.rng
> +--- libzypp-8.1.0/zypp/parser/yum/schema/common-inc.rng        2010-08-06
> 00:32:16.000000000 +0800
> ++++ libzypp-8.1.0.new/zypp/parser/yum/schema/common-inc.rng    2010-12-20
> 16:36:12.991526308 +0800
> +@@ -94,6 +94,8 @@
> +       <value>armv5tel</value>
> +       <value>armv7el</value>
> +       <value>armv7l</value>
> ++      <value>armv7hl</value>
> ++      <value>armv7nhl</value>
> +       <value>athlon</value>
> +       <value>i386</value>
> +       <value>i486</value>
>
> ++++++ MeeGo-resume-download.patch (new)
> --- MeeGo-resume-download.patch
> +++ MeeGo-resume-download.patch
> +diff -uNr libzypp-8.1.0/zypp/Fetcher.cc libzypp-8.1.0.new/zypp/Fetcher.cc
> +--- libzypp-8.1.0/zypp/Fetcher.cc      2010-12-20 11:23:22.352574623 +0800
> ++++ libzypp-8.1.0.new/zypp/Fetcher.cc  2010-12-20 11:41:13.390574478 +0800
> +@@ -550,21 +550,27 @@
> +       // try to get the file from the net
> +       try
> +       {
> +-        Pathname tmp_file = media.provideFile(resource,
> resource.optional() ? MediaSetAccess::PROVIDE_NON_INTERACTIVE :
> MediaSetAccess::PROVIDE_DEFAULT, deltafile );
> +-
> +         Pathname dest_full_path = dest_dir + resource.filename();
> ++        Pathname tmp_file;
> +
> +         if ( assert_dir( dest_full_path.dirname() ) != 0 )
> +               ZYPP_THROW( Exception("Can't create " +
> dest_full_path.dirname().asString()));
> +-        if ( filesystem::hardlinkCopy( tmp_file, dest_full_path ) != 0 )
> ++
> ++        if ( deltafile.asString() == "" )
> ++          media.provideFile(resource, resource.optional() ?
> MediaSetAccess::PROVIDE_NON_INTERACTIVE : MediaSetAccess::PROVIDE_DEFAULT,
> dest_full_path );
> ++        else
> +         {
> +-          if ( ! PathInfo(tmp_file).isExist() )
> +-              ERR << tmp_file << " does not exist" << endl;
> +-          if ( ! PathInfo(dest_full_path.dirname()).isExist() )
> +-              ERR << dest_full_path.dirname() << " does not exist" <<
> endl;
> ++          tmp_file = media.provideFile(resource, resource.optional() ?
> MediaSetAccess::PROVIDE_NON_INTERACTIVE : MediaSetAccess::PROVIDE_DEFAULT,
> deltafile );
> ++          if ( filesystem::hardlinkCopy( tmp_file, dest_full_path ) != 0
> )
> ++          {
> ++            if ( ! PathInfo(tmp_file).isExist() )
> ++                ERR << tmp_file << " does not exist" << endl;
> ++            if ( ! PathInfo(dest_full_path.dirname()).isExist() )
> ++                ERR << dest_full_path.dirname() << " does not exist" <<
> endl;
> +
> +-          media.releaseFile(resource); //not needed anymore, only eat
> space
> +-          ZYPP_THROW( Exception("Can't hardlink/copy " +
> tmp_file.asString() + " to " + dest_dir.asString()));
> ++            media.releaseFile(resource); //not needed anymore, only eat
> space
> ++            ZYPP_THROW( Exception("Can't hardlink/copy " +
> tmp_file.asString() + " to " + dest_dir.asString()));
> ++          }
> +         }
> +
> +         media.releaseFile(resource); //not needed anymore, only eat space
> +diff -uNr libzypp-8.1.0/zypp/media/MediaMultiCurl.cc
> libzypp-8.1.0.new/zypp/media/MediaMultiCurl.cc
> +--- libzypp-8.1.0/zypp/media/MediaMultiCurl.cc 2010-11-06
> 17:44:08.639456006 +0800
> ++++ libzypp-8.1.0.new/zypp/media/MediaMultiCurl.cc     2010-12-20
> 11:24:29.770636984 +0800
> +@@ -14,6 +14,7 @@
> + #include <sys/types.h>
> + #include <signal.h>
> + #include <sys/wait.h>
> ++#include <sys/stat.h>
> + #include <netdb.h>
> + #include <arpa/inet.h>
> +
> +@@ -1180,37 +1181,61 @@
> + void MediaMultiCurl::doGetFileCopy( const Pathname & filename , const
> Pathname & target, callback::SendReport<DownloadProgressReport> & report,
> RequestOptions options ) const
> + {
> +   Pathname dest = target.absolutename();
> ++  string destNew;
> ++  FILE *file = NULL;
> +   if( assert_dir( dest.dirname() ) )
> +   {
> +     DBG << "assert_dir " << dest.dirname() << " failed" << endl;
> +     Url url(getFileUrl(filename));
> +     ZYPP_THROW( MediaSystemException(url, "System error on " +
> dest.dirname().asString()) );
> +   }
> +-  string destNew = target.asString() + ".new.zypp.XXXXXX";
> +-  char *buf = ::strdup( destNew.c_str());
> +-  if( !buf)
> ++  if ( deltafile().asString() != "" )
> +   {
> +-    ERR << "out of memory for temp file name" << endl;
> +-    Url url(getFileUrl(filename));
> +-    ZYPP_THROW(MediaSystemException(url, "out of memory for temp file
> name"));
> ++    destNew = deltafile().asString();
> ++    Pathname target_path(destNew.c_str());
> ++    struct stat file_info;
> ++    curl_off_t file_off = -1 ;
> ++
> ++    file = ::fopen( destNew.c_str(), "ab+" );
> ++    if ( !file ) {
> ++      filesystem::unlink( destNew );
> ++      ERR << "fopen failed for file '" << destNew << "'" << endl;
> ++      ZYPP_THROW(MediaWriteException(destNew));
> ++    }
> ++    if ( stat(destNew.c_str(), &file_info) == 0 )
> ++    {
> ++       file_off = file_info.st_size;
> ++       curl_easy_setopt(_curl, CURLOPT_RESUME_FROM_LARGE, file_off);
> ++    }
> +   }
> +-
> +-  int tmp_fd = ::mkstemp( buf );
> +-  if( tmp_fd == -1)
> ++  else
> +   {
> ++    destNew = target.asString() + ".new.zypp.XXXXXX";
> ++    char *buf = ::strdup( destNew.c_str());
> ++    if( !buf)
> ++    {
> ++      ERR << "out of memory for temp file name" << endl;
> ++      Url url(getFileUrl(filename));
> ++      ZYPP_THROW(MediaSystemException(url, "out of memory for temp file
> name"));
> ++    }
> ++
> ++    int tmp_fd = ::mkstemp( buf );
> ++    if( tmp_fd == -1)
> ++    {
> ++      free( buf);
> ++      ERR << "mkstemp failed for file '" << destNew << "'" << endl;
> ++      ZYPP_THROW(MediaWriteException(destNew));
> ++    }
> ++    destNew = buf;
> +     free( buf);
> +-    ERR << "mkstemp failed for file '" << destNew << "'" << endl;
> +-    ZYPP_THROW(MediaWriteException(destNew));
> +-  }
> +-  destNew = buf;
> +-  free( buf);
> +
> +-  FILE *file = ::fdopen( tmp_fd, "w" );
> +-  if ( !file ) {
> +-    ::close( tmp_fd);
> +-    filesystem::unlink( destNew );
> +-    ERR << "fopen failed for file '" << destNew << "'" << endl;
> +-    ZYPP_THROW(MediaWriteException(destNew));
> ++    file = ::fdopen( tmp_fd, "w" );
> ++    if ( !file ) {
> ++      ::close( tmp_fd);
> ++      filesystem::unlink( destNew );
> ++      ERR << "fopen failed for file '" << destNew << "'" << endl;
> ++      ZYPP_THROW(MediaWriteException(destNew));
> ++    }
> +   }
> +   DBG << "dest: " << dest << endl;
> +   DBG << "temp: " << destNew << endl;
> +@@ -1226,8 +1251,6 @@
> +     curl_easy_setopt(_curl, CURLOPT_TIMECONDITION, CURL_TIMECOND_NONE);
> +     curl_easy_setopt(_curl, CURLOPT_TIMEVALUE, 0L);
> +   }
> +-  // change header to include Accept: metalink
> +-  curl_easy_setopt(_curl, CURLOPT_HTTPHEADER, _customHeadersMetalink);
> +   try
> +     {
> +       MediaCurl::doGetFileCopyFile(filename, dest, file, report,
> options);
> +@@ -1325,7 +1348,7 @@
> +       ERR << "Fclose failed for file '" << destNew << "'" << endl;
> +       ZYPP_THROW(MediaWriteException(destNew));
> +     }
> +-  if ( rename( destNew, dest ) != 0 )
> ++  if ( deltafile().asString() == "" && rename( destNew, dest ) != 0 )
> +     {
> +       ERR << "Rename failed" << endl;
> +       ZYPP_THROW(MediaWriteException(dest));
>
> _______________________________________________
> MeeGo-commits mailing list
> [email protected]
> http://lists.meego.com/listinfo/meego-commits
>
_______________________________________________
MeeGo-packaging mailing list
[email protected]
http://lists.meego.com/listinfo/meego-packaging

Reply via email to