Issue about GBS(0.24.1) import error

From Tizen Wiki
Jump to: navigation, search

Import src.rpm error

In version 0.24.1 of gbs, pristine-tar upgrade xdelta to xdelta3 but left pristine-gz, and some packages will be imported failed due to using old xdelta.

Example package:http://download.tizen.org/snapshots/tizen/common/tizen-common_20160723.1/repos/arm-wayland/source/libtasn1-4.8-7.3.src.rpm

Error message at importing the package

   scm@linux:~$ gbs import libtasn1-4.8-7.3.src.rpm
   info: Extracting src rpm to '/var/tmp/gbp_cMYvCs/import-srpmOrSXVF/pkgextract_gO8g_M'
   info: No git repository found, creating one.
   info: Tag upstream/4.8 not found, importing Upstream upstream sources
   info: Will create missing branch 'upstream'
   Use of uninitialized value $bestsize in subtraction (-) at /usr/bin/pristine-gz line 255.
   Can't use an undefined value as an ARRAY reference at /usr/bin/pristine-gz line 256.
   pristine-tar: command failed: pristine-gz --no-verbose --no-debug --no-keep gendelta /var/tmp/gbp_cMYvCs/import-srpmOrSXVF/pkgextract_gO8g_M/libtasn1-4.8.tar.gz /tmp/pristine-tar.zIM7E6wlxz/wrapper
   pristine-tar: failed to generate delta
   error: Couldn't commit to 'pristine-tar' with upstream 'refs/heads/upstream': it exited with 9
   error: <gbs>Failed to import /home/scm/libtasn1-4.8-7.3.src.rpm

Patch pristine-gz

For Ubuntu, Debian user

  • modify 240th line of /usr/bin/pristine-gz
Befor After
   my $ret=system("xdelta delta -0 --pristine $tempout $orig $tempdir/tmpdelta 2>/dev/null") >> 8; 
   my $ret=system("xdelta3 -0 -e -s $tempout $orig $tempdir/tmpdelta 2>/dev/null") >> 8;
  • modify 303th line of /usr/bin/pristine-gz
Befor After
   doit("xdelta", "patch", "--pristine", $delta->{delta}, $tfile, "$file.gz");
   my $ret=system("xdelta3 -d -s $tfile $delta->{delta} $file.gz") >> 8;

For openSUSE, Fedora, CentOS user

  • modify 245th line of /usr/bin/pristine-gz
Befor After
   my $ret=system("$xdelta_program delta -0 --pristine $tempout $orig $tempdir/tmpdelta 2>/dev/null") >> 8;
   my $ret=system("$xdelta_program -0 -e -s $tempout $orig $tempdir/tmpdelta 2>/dev/null") >> 8;
  • modify 308th line of /usr/bin/pristine-gz
Befor After
   doit("$xdelta_program", "patch", "--pristine", $delta->{delta}, $tfile, "$file.gz");
   my $ret=system("$xdelta_program -d -s $tfile $delta->{delta} $file.gz") >> 8;