Hello community,

here is the log from the commit of package installation-images for 
openSUSE:Factory
checked in at Wed Jun 15 10:50:40 CEST 2011.



--------
--- installation-images/installation-images.changes     2011-05-30 
14:15:40.000000000 +0200
+++ 
/mounts/work_src_done/STABLE/installation-images/installation-images.changes    
    2011-06-14 16:09:46.000000000 +0200
@@ -1,0 +2,39 @@
+Tue Jun 14 16:09:36 CEST 2011 - [email protected]
+
+- anticipate build service download problems & retry before giving up
+- .oscrc might not be readable by root
+
+-------------------------------------------------------------------
+Tue Jun 14 14:24:19 CEST 2011 - [email protected]
+
+- read .oscrc for auth data, better error reporting
+- fix dbus-1 file list
+
+-------------------------------------------------------------------
+Fri Jun 10 14:23:09 CEST 2011 - [email protected]
+
+- fix libusb; the good old netcat is gone
+
+-------------------------------------------------------------------
+Tue Jun  7 10:55:05 CEST 2011 - [email protected]
+
+- don't forget to set suse release
+
+-------------------------------------------------------------------
+Fri Jun  3 16:39:23 CEST 2011 - [email protected]
+
+- more fixes
+
+-------------------------------------------------------------------
+Fri Jun  3 15:42:01 CEST 2011 - [email protected]
+
+- adjust module config
+- cleanup version mess
+- fix lib deps
+- change rpm name in cache
+- fix release tag
+- track obs repos
+- remove perl-Switch
+- support obs source
+
+-------------------------------------------------------------------

calling whatdependson for head-i586


Old:
----
  installation-images-12.81.tar.bz2
  needed_space_in_mb

New:
----
  installation-images-13.5.tar.bz2

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ installation-images.spec ++++++
--- /var/tmp/diff_new_pack.DW4BhK/_old  2011-06-15 10:50:03.000000000 +0200
+++ /var/tmp/diff_new_pack.DW4BhK/_new  2011-06-15 10:50:03.000000000 +0200
@@ -23,9 +23,9 @@
 %define has_sles 0
 %define build_xen 1
 %define has_vnc 1
-BuildRequires:  PolicyKit adaptec-firmware ash autoyast2-installation bc 
blueprint-cursor-theme cifs-utils cron cups-libs dd_rescue dhcpcd dhcpv6 dmraid 
dump ed efont-unicode eject fbiterm finger fonts-config gdb glibc-i18ndata hex 
icmpinfo initviocons iputils joe krb5-devel libidn libjpeg-devel libpng-devel 
links linuxrc lklug lvm2 mdadm mingetty mtools multipath-tools nasm netcat 
netpbm nfs-utils ntfsprogs openslp-server openssh pcmciautils pcre-devel 
popt-devel pothana2000 recode rsh rsync sbl screen setserial sg3_utils 
smartmontools socat sysconfig syslogd tcpd-devel telnet telnet-server termcap 
terminfo usbutils wget xfsdump
+BuildRequires:  PolicyKit adaptec-firmware ash autoyast2-installation bc 
blueprint-cursor-theme cifs-utils cron cups-libs dd_rescue dhcpcd dhcpv6 dmraid 
dump ed efont-unicode eject fbiterm finger fonts-config gdb glibc-i18ndata hex 
icmpinfo initviocons iputils joe krb5-devel libidn libjpeg-devel libpng-devel 
links linuxrc lklug lvm2 mdadm mingetty mtools multipath-tools nasm 
netcat-openbsd netpbm nfs-utils ntfsprogs openslp-server openssh pcmciautils 
pcre-devel popt-devel pothana2000 recode rsh rsync sbl screen setserial 
sg3_utils smartmontools socat sysconfig syslogd tcpd-devel telnet telnet-server 
termcap terminfo usbutils wget xfsdump
 BuildRequires:  e2fsprogs ncurses-utils yast2-add-on yast2-kdump yast2-mouse 
yast2-ncurses-pkg yast2-network yast2-nfs-client yast2-ntp-client yast2-qt 
yast2-qt-pkg yast2-runlevel yast2-slp yast2-trans-allpacks yast2-trans-stats 
yast2-tune yast2-update yast2-users
-BuildRequires:  aaa_base aaa_base-extras audit-libs busybox checkmedia 
cryptsetup dejavu dmapi dosfstools ethtool fvwm2 gpm hfsutils icewm-lite 
libcares2 libelf0 libzypp open-iscsi openct pciutils pciutils-ids pcsc-lite 
perl-HTML-Parser sqlite3 util-linux
+BuildRequires:  aaa_base aaa_base-extras audit-libs busybox checkmedia 
cryptsetup dejavu dmapi dosfstools ethtool fvwm2 gpm hfsutils icewm-lite 
libcares2 libelf0 libpcsclite1 libzypp open-iscsi openct pciutils pciutils-ids 
pcsc-lite perl-HTML-Parser sqlite3 util-linux
 BuildRequires:  build-key gpg2 jfsutils kexec-tools limal limal-perl 
perl-Switch perl-XML-Bare perl-XML-NamespaceSupport perl-XML-Parser 
perl-XML-Simple yast2-iscsi-client yast2-ncurses
 BuildRequires:  Mesa libXi6 xkeyboard-config xorg-x11 xorg-x11-Xnest 
xorg-x11-Xvfb xorg-x11-fonts xorg-x11-fonts-core xorg-x11-libICE xorg-x11-libSM 
xorg-x11-libX11 xorg-x11-libXau xorg-x11-libXdmcp xorg-x11-libXext 
xorg-x11-libXfixes xorg-x11-libXmu xorg-x11-libXp xorg-x11-libXpm 
xorg-x11-libXrender xorg-x11-libXt xorg-x11-libfontenc xorg-x11-libs 
xorg-x11-libxcb xorg-x11-libxkbfile xorg-x11-server xterm
 BuildRequires:  bzip2 cracklib cracklib-dict-full curl gpart iproute2 
libexpat1 libfuse2 libreiserfs libreiserfs-devel module-init-tools nfs-client 
ntfs-3g parted procinfo procps psmisc reiserfs satsolver-tools squashfs strace 
vim xntp xz yast2-devtools
@@ -106,9 +106,9 @@
 Obsoletes:      y2image
 AutoReqProv:    off
 Summary:        Installation Image Files
-Version:        12.81
+Version:        13.5
 Release:        1
-Source:         installation-images-12.81.tar.bz2
+Source:         installation-images-13.5.tar.bz2
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 %define _binary_payload w.ufdio
 

++++++ installation-images-12.81.tar.bz2 -> installation-images-13.5.tar.bz2 
++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/installation-images-12.81/VERSION 
new/installation-images-13.5/VERSION
--- old/installation-images-12.81/VERSION       2011-05-30 13:26:13.000000000 
+0200
+++ new/installation-images-13.5/VERSION        2011-06-14 16:09:31.000000000 
+0200
@@ -1 +1 @@
-12.81
+13.5
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/installation-images-12.81/changelog 
new/installation-images-13.5/changelog
--- old/installation-images-12.81/changelog     2011-05-30 13:26:16.000000000 
+0200
+++ new/installation-images-13.5/changelog      2011-06-14 16:09:34.000000000 
+0200
@@ -1,4 +1,30 @@
-2011-05-30:    HEAD
+2011-06-14:    HEAD
+       - anticipate build service download problems & retry before giving up
+       - .oscrc might not be readable by root
+
+2011-06-14:    13.4
+       - read .oscrc for auth data, better error reporting
+
+2011-06-10:    13.3
+       - fix libusb; the good old netcat is gone
+
+2011-06-07:    13.2
+       - don't forget to set suse release
+
+2011-06-03:    13.1
+       - more fixes
+
+2011-06-03:    13.0
+       - adjust module config
+       - cleanup version mess
+       - fix lib deps
+       - change rpm name in cache
+       - fix release tag
+       - track obs repos
+       - support obs source
+       - remove perl-Switch
+
+2011-05-30:    12.81
        - fix build with kernel 2.6.39 & and lib dependencies
        - fixtypo
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/installation-images-12.81/data/initrd/biostest.file_list 
new/installation-images-13.5/data/initrd/biostest.file_list
--- old/installation-images-12.81/data/initrd/biostest.file_list        
2011-05-30 13:25:50.000000000 +0200
+++ new/installation-images-13.5/data/initrd/biostest.file_list 2011-06-14 
16:08:50.000000000 +0200
@@ -57,7 +57,7 @@
   /usr/lib*/libk5crypto.so.*
 
 keyutils-libs:
-  /lib*/libkeyutils{.,-}*
+  /
 
 libcom_err2:
   /lib*/libcom_err.so.*
@@ -65,8 +65,8 @@
 libltdl7:
   /usr/lib*
 
-pcsc-lite:
-  /usr/lib*/libpcsclite.so*
+libpcsclite1:
+  /
 
 libopenct1:
   /usr/lib*/libopenct.so*
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/installation-images-12.81/data/initrd/initrd.file_list 
new/installation-images-13.5/data/initrd/initrd.file_list
--- old/installation-images-12.81/data/initrd/initrd.file_list  2011-05-30 
13:25:50.000000000 +0200
+++ new/installation-images-13.5/data/initrd/initrd.file_list   2011-06-14 
16:08:50.000000000 +0200
@@ -132,16 +132,16 @@
   /sbin/mount.cifs
 
 sysfsutils:
-  /lib*/libsysfs.so.*
+  /<lib>
 
 dbus-1:
   /lib*/libdbus-1.so.*
 
 libusb-0_1-4:
-  /usr/lib*
+  /
 
-libusb-1_0-0:
-  /usr/lib*
+libusb-*-*:
+  /
 
 libuuid1:
   /
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/installation-images-12.81/data/rescue/rescue.file_list 
new/installation-images-13.5/data/rescue/rescue.file_list
--- old/installation-images-12.81/data/rescue/rescue.file_list  2011-05-30 
13:25:50.000000000 +0200
+++ new/installation-images-13.5/data/rescue/rescue.file_list   2011-06-14 
16:08:50.000000000 +0200
@@ -278,7 +278,7 @@
   /{,s}bin
   /usr/sbin
 
-netcat:
+netcat-openbsd:
   /usr/bin
 
 socat:
@@ -444,7 +444,7 @@
   /usr/lib*/libk5crypto.so.*
 
 keyutils-libs:
-  /lib*/libkeyutils{.,-}*
+  /
 
 strace:
   /usr/bin/strace
@@ -588,10 +588,10 @@
 hex:
   /usr/bin/hex
 
-pcsc-lite:
-  /usr/lib*/libpcsclite.so*
+libpcsclite*:
+  /
 
-libopenct1:
+libopenct*:
   /
 
 dhcpcd:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/installation-images-12.81/data/root/root.file_list 
new/installation-images-13.5/data/root/root.file_list
--- old/installation-images-12.81/data/root/root.file_list      2011-05-30 
13:25:50.000000000 +0200
+++ new/installation-images-13.5/data/root/root.file_list       2011-06-14 
16:08:50.000000000 +0200
@@ -591,11 +591,11 @@
   m /sbin/syslogd /sbin/syslogd.bin
   x etc/syslogd /sbin/syslogd
 
-pcsc-lite:
-  /usr/lib*/libpcsclite.so*
+libpcsclite*:
+  /
 
-libopenct1:
-  /usr/lib*/libopenct.so*
+libopenct*:
+  /
 
 krb5:
   /etc
@@ -745,7 +745,7 @@
   /
 
 libusb-0_1-4:
-  /usr/lib*
+  /
 
 libusb-*-*:
   /
@@ -808,7 +808,6 @@
   /usr/lib/perl*/*/*/Socket.pm
   /usr/lib/perl*/*/XSLoader.pm
   /usr/lib/perl*/*/*/auto/Data/Dumper
-  /usr/lib/perl*/*/*/auto/DynaLoader
   /usr/lib/perl*/*/*/auto/Fcntl
   /usr/lib/perl*/*/*/auto/File/Glob
   /usr/lib/perl*/*/*/auto/IO
@@ -832,9 +831,7 @@
   /usr/lib/perl*/*/Pod/Text.pm
   /usr/lib/perl*/*/Pod/Usage.pm
   /usr/lib/perl*/*/SelfLoader.pm
-  /usr/lib/perl*/*/Switch.pm
   /usr/lib/perl*/*/Term/Cap.pm
-  /usr/lib/perl*/*/Tie/Hash
   /usr/lib/perl*/*/Time/Local.pm
   /usr/lib/perl*/*/Time/localtime.pm
   /usr/lib/perl*/*/Time/tm.pm
@@ -874,9 +871,6 @@
 perl-gettext:
   /usr/lib
 
-perl-Switch:
-  /usr/lib
-
 perl-XML-Simple:
   /usr/lib
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/installation-images-12.81/etc/config 
new/installation-images-13.5/etc/config
--- old/installation-images-12.81/etc/config    2011-05-30 13:25:50.000000000 
+0200
+++ new/installation-images-13.5/etc/config     2011-06-14 16:08:50.000000000 
+0200
@@ -1,23 +1,11 @@
-; versions
-[Version]
-default         = 11.4
-head     = 11.4
-beta     = 11.4,beta
-debug    = 11.4,debug
-11.1     = 11.1
-11.2     = 11.2
-11.3     = 11.3
-11.4     = 11.4
-sles11   = 11.1
-sled11   = 11.1
-sle11    = 11.1
-11.0     = 11.0
-10.3     = 10.3
-10.2     = 10.2
-sles10   = 10.1
-sled10   = 10.1
-sle10-sp = 10.1
-10.1     = 10.1
+; OBS access data
+; looks at ~/.oscrc for user & password if necessary
+[OBS]
+server     = http://buildservice:5352
+# server     = https://api.opensuse.org
+# server     = https://user:[email protected]
+project    = openSUSE:Factory
+repository = standard
 
 
 ; kernel image name
@@ -79,17 +67,8 @@
 bsplash = openSUSE
 ksplash = openSUSE
 product        = openSUSE
-version = 11.4
-update = /linux/suse/<arch>-<rel>
-image  = 350
-
-
-[Theme SuSE]
-yast   = openSUSE
-bsplash = openSUSE
-ksplash = openSUSE
-product        = openSUSE
-version = 11.4
+version = 12.1
+sle     = 12
 update = /linux/suse/<arch>-<rel>
 image  = 350
 
@@ -98,8 +77,9 @@
 yast   = SLED
 bsplash = openSUSE
 ksplash = SLES
-product        = SUSE Linux Enterprise Server 11
-version = 11.1
+product        = SUSE Linux Enterprise Server 12
+version = 12.1
+sle     = 12
 update = /linux/suse/<arch>-<sles>
 image  = 200
 
@@ -108,8 +88,9 @@
 yast   = SLED
 bsplash = openSUSE
 ksplash        = SLED
-product        = SUSE Linux Enterprise Desktop 11
-version = 11.1
+product        = SUSE Linux Enterprise Desktop 12
+version = 12.1
+sle     = 12
 update = /linux/suse/<arch>-<sled>
 image  = 200
 
@@ -119,7 +100,8 @@
 bsplash = SLES
 ksplash = SLES
 product = ZENworks
-version = 11.1
+version = 12.1
+sle     = 12
 update  = /linux/suse/<arch>-<sles>
 image   = 200
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/installation-images-12.81/etc/module.config 
new/installation-images-13.5/etc/module.config
--- old/installation-images-12.81/etc/module.config     2011-05-30 
13:25:50.000000000 +0200
+++ new/installation-images-13.5/etc/module.config      2011-06-14 
16:08:50.000000000 +0200
@@ -131,6 +131,7 @@
 wm8350,-,-
 xen-platform-pci,-,-
 xenbus,-,-
+lis3lv02d,-,-
 kernel/arch/.*/crypto/.*
 kernel/arch/.*/kernel/.*,,-
 kernel/crypto/.*
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/installation-images-12.81/etc/module.list 
new/installation-images-13.5/etc/module.list
--- old/installation-images-12.81/etc/module.list       2011-05-30 
13:25:50.000000000 +0200
+++ new/installation-images-13.5/etc/module.list        2011-06-14 
16:08:50.000000000 +0200
@@ -190,6 +190,8 @@
 kernel/drivers/gpu/drm/drm.ko
 kernel/drivers/video/sis/
 
+kernel/drivers/misc/lis3lv02d/lis3lv02d.ko
+
 # kmps
 updates/
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/installation-images-12.81/lib/AddFiles.pm 
new/installation-images-13.5/lib/AddFiles.pm
--- old/installation-images-12.81/lib/AddFiles.pm       2011-05-30 
13:25:47.000000000 +0200
+++ new/installation-images-13.5/lib/AddFiles.pm        2011-06-14 
15:55:42.000000000 +0200
@@ -156,7 +156,7 @@
 
     $ifmsg = sprintf " [%x|%x] %s\n", $if_val, $if_taken, $_;
 
-    
s/<(kernel_ver|kernel_mods|kernel_rpm|kernel_img|suse_release|theme|product|product_name|yast_theme|splash_theme|update_dir|load_image|min_memory|instsys_build_id|instsys_complain|instsys_complain_root|arch|lib)>/$ConfigData{$1}/g;
+    
s/<(kernel_ver|kernel_mods|kernel_rpm|kernel_img|(suse|sles|sled)_release|theme|product|product_name|yast_theme|splash_theme|update_dir|load_image|min_memory|instsys_build_id|instsys_complain|instsys_complain_root|arch|lib)>/$ConfigData{$1}/g;
     for $i (qw( linuxrc lang extramod items )) {
       s/<$i>/$ENV{$i}/g if exists $ENV{$i};
     }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/installation-images-12.81/lib/ReadConfig.pm 
new/installation-images-13.5/lib/ReadConfig.pm
--- old/installation-images-12.81/lib/ReadConfig.pm     2011-05-30 
13:25:47.000000000 +0200
+++ new/installation-images-13.5/lib/ReadConfig.pm      2011-06-14 
15:55:42.000000000 +0200
@@ -176,6 +176,12 @@
 );
 
 use Cwd;
+use File::Path 'make_path';
+use File::Spec 'abs2rel';
+
+sub get_repo_list;
+sub read_meta;
+sub read_packages;
 
 
 sub DebugInfo
@@ -219,33 +225,55 @@
 { 
   local $_;
   my $rpm = shift;
-  my ($f, @f, @ff, $p, $back, $n, %n);
+  my ($f, @f, @ff, $p, $back, $n, %n, $r);
 
   return $rpmData->{$rpm} if exists $rpmData->{$rpm};
 
-  my $dir = $ConfigData{'suse_base'};
-
   $back = 1 if $rpm =~ s/~$//;
 
-  @f = grep { -f } <$ConfigData{cache_dir}/$rpm.rpm $dir/$rpm.rpm>;
-  for (@f) {
-    $n = $_;
-    s#^.*/|\.rpm$##g;
-    $n{$_} = $n unless exists $n{$_};
-  }
-
-  return $rpmData->{$rpm} = undef if @f == 0;
-
-  $p = $rpm;
-  $p = "\Q$p";
-  $p =~ s/\\\*/([0-9_]+)/g;
-  @f = grep { /^$p$/ } @f;
-  @f = sort @f;
-  # for (@f) { print ">$_<\n"; }
-  $f = pop @f;
-  $f = pop @f if $back;
+  if($ConfigData{obs}) {
+    $p = $rpm;
+    $p = "\Q$p";
+    $p =~ s/\\\*/([0-9_]+)/g;
+    @f = grep { /^$p / } @{$ConfigData{packages}};
+
+    return $rpmData->{$rpm} = undef if @f == 0;
+
+    @f = sort @f;
+    # for (@f) { print ">$_<\n"; }
+    $f = pop @f;
+    $f = pop @f if $back;
+
+    if($f =~ m/^(\S+) (.+)$/) {
+      return $rpmData->{$1} = $rpmData->{$rpm} = { name => $1, file => 
"$ConfigData{tmp_cache_dir}/.obs/$2/$1.rpm", rfile => "../.obs/$2/$1.rpm", obs 
=> "$2" };
+    }
+    else {
+      return $rpmData->{$rpm} = undef;
+    }
+  }
+  else {
+    my $dir = $ConfigData{suse_base};
+
+    @f = grep { -f } <$ConfigData{cache_dir}/$rpm.rpm $dir/$rpm.rpm>;
+    for (@f) {
+      $n = $_;
+      s#^.*/|\.rpm$##g;
+      $n{$_} = $n unless exists $n{$_};
+    }
+
+    return $rpmData->{$rpm} = undef if @f == 0;
+
+    $p = $rpm;
+    $p = "\Q$p";
+    $p =~ s/\\\*/([0-9_]+)/g;
+    @f = grep { /^$p$/ } @f;
+    @f = sort @f;
+    # for (@f) { print ">$_<\n"; }
+    $f = pop @f;
+    $f = pop @f if $back;
 
-  return $rpmData->{$f} = $rpmData->{$rpm} = { name => $f, file => $n{$f} } ;
+    return $rpmData->{$f} = $rpmData->{$rpm} = { name => $f, file => $n{$f} } ;
+  }
 }
 
 
@@ -256,15 +284,31 @@
 {
   my $rpm = shift;
   my $dir = shift;
+  my ($log, $i);
 
   return 1 unless $rpm;
 
+  if($rpm->{obs} && ! -f $rpm->{file}) {
+    # retry up to 3 times
+    for ($i = 0; $i < 3; $i++) {
+      $log .= `curl -o '$rpm->{file}' 
'$ConfigData{obs_server}/build/$rpm->{obs}/$ConfigData{obs_arch}/_repository/$rpm->{name}.rpm'
 2>&1`;
+      # system "curl -s -o '$rpm->{file}' '$ConfigData{obs_url}/$rpm->{obs}'";
+      last if -f $rpm->{file};
+    }
+    if(! -f $rpm->{file}) {
+      print STDERR "$rpm->{file}: 
$ConfigData{obs_server}/build/$rpm->{obs}/$ConfigData{obs_arch}/_repository/$rpm->{name}.rpm\n"
 . $log;
+      warn "$Script: failed to download $rpm->{name}";
+      return 1
+    }
+  }
+
   if(SUSystem "sh -c 'cd $dir ; rpm2cpio $rpm->{file} | cpio --quiet --sparse 
-dimu --no-absolute-filenames'") {
+    print STDERR "$rpm->{file}: 
$ConfigData{obs_server}/build/$rpm->{obs}/$ConfigData{obs_arch}/_repository/$rpm->{name}.rpm\n"
 . $log;
     warn "$Script: failed to extract $rpm->{name}";
     return 1;
   }
 
-  symlink($rpm->{file}, "$ConfigData{tmp_cache_dir}/.rpms/$rpm->{name}");
+  symlink($rpm->{rfile} ? $rpm->{rfile} : $rpm->{file}, 
"$ConfigData{tmp_cache_dir}/.rpms/$rpm->{name}.rpm");
 
   return 0;
 }
@@ -280,7 +324,7 @@
 
   my $rpm = RealRPM $_[0];
 
-  if(!$rpm) {
+  if(!$rpm || !$rpm->{name}) {
     warn "$Script: no such package: $_[0]";
     return undef;
   }
@@ -367,7 +411,6 @@
       print "warning: kmp/firmware version mismatch: $_\n";
       SUSystem "sh -c 'tar -C $tdir/lib/modules/$_ -cf - . | tar -C 
$tdir/lib/modules/$kv -xf -'";
     }
-
   }
 
   return $err ? undef : $dir;
@@ -438,6 +481,133 @@
 }
 
 
+sub get_repo_list
+{
+  local $_;
+
+  my $prj = shift;
+  my $repo = shift;
+  my $inrepo;
+  my $r = [ ];
+
+  # print "($prj, $repo)\n";
+
+  for (`curl -s '$ConfigData{obs_server}/source/$prj/_meta'`) {
+    if($inrepo) {
+      if(/<path/) {
+        my $x;
+        $x->[0] = $1 if /\sproject="([^"]+)"/;
+        $x->[1] = $1 if /\srepository="([^"]+)"/;
+        push @$r, $x if @$x == 2;
+        next;
+      }
+      elsif(/<\/repository>/) {
+        last;
+      }
+    }
+    elsif(/<repository.*\sname="\Q$repo\E"/) {
+      $inrepo = 1;
+      next;
+    }
+  }
+
+  # for (@$r) { print "> $_->[0] - $_->[1]\n"; }
+
+  return $r;
+}
+
+
+sub read_meta
+{
+  local $_;
+
+  my $prj = shift;
+  my $repo = shift;
+  my $list = [[ $prj, $repo ]];
+  my %seen;
+  my $cnt;
+
+  do {
+    $cnt = 0;
+    for (@{get_repo_list(@{$list->[-1]})}) {
+      if(!$seen{"$_->[0]/$_->[1]"}) {
+        push @$list, $_;
+        $cnt++;
+      }
+      $seen{"$_->[0]/$_->[1]"} = 1;
+    }
+  } while($cnt);
+
+  # for (@$list) { print ">> $_->[0] - $_->[1]\n"; }
+
+  return $list;
+}
+
+
+sub read_packages
+{
+  local $_;
+
+  my $prj = shift;
+  my $repo = shift;
+  my ($list, %seen, $l, @packages, $f, $p, $r);
+
+  if(-f "$ConfigData{tmp_cache_dir}/.obs/packages") {
+    open $f, "$ConfigData{tmp_cache_dir}/.obs/packages";
+    while(<$f>) {
+      chomp;
+      push @packages, $_;
+    }
+    close $f;
+    if(@packages) {
+      $ConfigData{packages} = [ @packages ];
+    }
+    else {
+      die "no packages in $ConfigData{suse_base}\n";
+    }
+
+    return;
+  }
+
+  print STDERR "Reading OBS meta data...";
+
+  $list = read_meta($prj, $repo);
+
+  open $f, ">", "$ConfigData{tmp_cache_dir}/.obs/repositories";
+
+  for $l (@$list) {
+    $p = $l->[0];
+    $r = $l->[1];
+
+    print $f "$p $r\n";
+    die "$Script: failed to create $ConfigData{tmp_cache_dir}/.obs/$p/$r ($!)" 
unless make_path "$ConfigData{tmp_cache_dir}/.obs/$p/$r";
+
+    for (`curl -s 
'$ConfigData{obs_server}/build/$p/$r/$ConfigData{obs_arch}/_repository?view=binaryversions&nometa=1'`)
 {
+      if(/<binary\s+name="([^"]+)\.rpm"/) {
+        push @packages, "$1 $p/$r" unless $seen{$1};
+        $seen{$1} = 1;
+      }
+    }
+  }
+
+  close $f;
+
+  # for (@packages) { print "$_\n"; }
+
+  if(@packages) {
+    open $f, ">", "$ConfigData{tmp_cache_dir}/.obs/packages";
+    for (@packages) { print $f "$_\n" }
+    close $f;
+    $ConfigData{packages} = [ @packages ];
+  }
+  else {
+    die "no packages in $ConfigData{suse_base}\n";
+  }
+
+  print STDERR "\n";
+}
+
+
 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #
 # initialization part
@@ -517,6 +687,7 @@
 $susearch = 'axp' if $arch eq 'alpha';
 
 $ConfigData{arch} = $arch;
+$ConfigData{obs_arch} = $arch eq 'i386' ? 'i586' : $arch;
 
 
 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@@ -632,14 +803,14 @@
 
 
 {
-  # set suse_release, suse_base, suse_xrelease
+  # set suse_base
   # kernel_ver
   # (used to be in etc/config)
 
   my ( $r, $r0, $rx, $in_abuild, $a, $v, $kv, $rf, $ki, @f );
-  my ( $theme, $sles_release, $load_image, $yast_theme, $splash_theme, 
$product_name, $update_dir, $sled_release );
+  my ( $theme, $load_image, $yast_theme, $splash_theme, $product_name, 
$update_dir);
 
-  my ( $dist, $i, $j, $rel, $xrel );
+  my ( $dist, $i, $j );
 
   $in_abuild = $ConfigData{buildenv}{BUILD_BASENAME} ? 1 : 0;
   $in_abuild = 1 if -d "$ConfigData{buildroot}/.build.binaries";
@@ -658,20 +829,13 @@
 
     $ConfigData{suse_base} = $AutoBuild = $rpmdir;
   }
-  else {
+  elsif($ENV{work} || $ENV{dist}) {
     my ($work, $base, $xdist);
 
     $dist = $susearch;
 
-    $work = $ENV{work};
-    if(!$work) {
-      $work = "/work";
-      $work = "/mounts/work" if ! -d "$work/CDs";
-      $work .= "/CDs";
-      $work .= "/all" if -d "$work/all";
-    }
-
-    $xdist = $ENV{dist} ? $ENV{dist} : $ENV{suserelease};
+    $work = $ENV{work} ? $ENV{work} : "/mounts/dist/full";
+    $xdist = $ENV{dist} ? $ENV{dist} : "head-$dist";
 
     if($xdist) {
       $base = "$work/full-$xdist/suse";
@@ -688,31 +852,81 @@
     die "Sorry, could not locate packages for \"$dist\" ($base).\n" unless -d 
$base;
 
     $ConfigData{suse_base} = "$base/*";
-
   }
+  else {
+    # OBS
 
-  $ConfigData{dist} = $dist;
+    $ConfigData{obs} = 1;
 
-  # print STDERR "base = $ConfigData{suse_base}\n";
+    my ($obs_proj, $obs_repo);
 
-  $i = $dist;
+    $ConfigData{obs_proj} = $ConfigData{ini}{OBS}{project};
+    $ConfigData{obs_repo} = $ConfigData{ini}{OBS}{repository};
+    $ConfigData{obs_server} = $ConfigData{ini}{OBS}{server};
+
+    if($ENV{obs} =~ m#^([^/]+)/([^/]+)-([^/-]+)$#) {
+      $ConfigData{obs_proj} = $1;
+      $ConfigData{obs_repo} = $2;
+      $ConfigData{obs_arch} = $3;
+    }
+
+    my ($f, $u, $p, $s);
 
-  while(!($rel = $ConfigData{ini}{Version}{$i}) && $i =~ s/-[^\-]+$//) {}
-  $rel = $ConfigData{ini}{Version}{default} if !$rel && $dist !~ /-/;
+    if($ConfigData{obs_server} !~ /\@/ && -f "$ENV{HOME}/.oscrc") {
+      if($< == 0) {
+        # to avoid problems with restrictive .oscrc permissions
+        open $f, "su `stat -c %U $ENV{HOME}/.oscrc` -c 'cat $ENV{HOME}/.oscrc' 
|";
+      }
+      else {
+        open $f, "$ENV{HOME}/.oscrc";
+      }
+      while(<$f>) {
+        undef $s if /^\s*\[/;
+        $s = 1 if /^\s*\[\Q$ConfigData{obs_server}\E\/?\]/;
+        $u = $1 if $s && /^\s*user\s*=\s*(\S+)/;
+        $p = $1 if $s && /^\s*pass\s*=\s*(\S+)/;
+      }
+      close $f;
+
+      if(defined($u) && defined($p)) {
+        $u =~ s/(\W)/sprintf("%%%02X", ord $1)/ge;
+        $p =~ s/(\W)/sprintf("%%%02X", ord $1)/ge;
+        $ConfigData{obs_server} =~ s#(://)#$1$u:$p@#;
+      }
+      elsif($ConfigData{obs_server} =~ /^https:/) {
+        warn "\nWarning: *** no auth data for $ConfigData{obs_server}! 
***\n\n";
+        sleep 2;
+      }
 
-  die "Sorry, \"$ConfigData{dist}\" is not supported.\n" unless $rel;
+      # print "$ConfigData{obs_server}\n";
+    }
+
+    $ConfigData{obs_url} = 
"$ConfigData{obs_server}/build/$ConfigData{obs_proj}/$ConfigData{obs_repo}/$ConfigData{obs_arch}/_repository";
 
-  $xrel = $1 if $rel =~ s/,([^,]+)//;
+    $ConfigData{suse_base} = 
"$ConfigData{obs_proj}/$ConfigData{obs_repo}-$ConfigData{obs_arch}";
 
-  # print STDERR "rel = $rel ($xrel)\n";
+    ($dist = $ConfigData{suse_base}) =~ tr#/#-#;
+
+    # print "$ConfigData{suse_base}\n";
+  }
 
-  $ConfigData{suse_release} = $rel;
-  $ConfigData{suse_xrelease} = $xrel;
+  $ConfigData{dist} = $dist;
+
+  # print STDERR "base = $ConfigData{suse_base}\n";
+
+  $i = $dist;
 
   $ConfigData{cache_dir} = getcwd() . "/${BasePath}cache/$ConfigData{dist}";
   $ConfigData{tmp_cache_dir} = getcwd() . 
"/${BasePath}tmp/cache/$ConfigData{dist}";
   system "mkdir -p $ConfigData{tmp_cache_dir}/.rpms" unless -d 
"$ConfigData{tmp_cache_dir}/.rpms";
 
+  if($ConfigData{obs}) {
+    my ($f, @rpms);
+    system "mkdir -p $ConfigData{tmp_cache_dir}/.obs" unless -d 
"$ConfigData{tmp_cache_dir}/.obs";
+
+    read_packages($ConfigData{obs_proj}, $ConfigData{obs_repo});
+  }
+
   my $k_dir = ReadRPM $ConfigData{kernel_rpm};
   if($k_dir) {
     my @k_images = KernelImg [ `find $k_dir/rpm/boot -type f` ];
@@ -734,20 +948,7 @@
   # print STDERR "kernel_rpm = $ConfigData{kernel_rpm}\n";
   # print STDERR "kernel_ver = $ConfigData{kernel_ver}\n";
 
-  $theme = $ENV{theme} ? $ENV{theme} : "SuSE";
-
-  for $i (sort version_sort keys %{$ConfigData{ini}{Version}}) {
-    $j = $ConfigData{ini}{Version}{$i};
-    $j =~ s/,([^,]+)//;
-    if($j <= $ConfigData{suse_release}) {
-      $sles_release = $i if $i =~ /^sles/;
-      $sled_release = $i if $i =~ /^sled/;
-    }
-  }
-
-  die "Oops, no SLES release number found\n" unless $sles_release;
-
-  # print STDERR "sles = $sles_release\n";
+  $theme = $ENV{theme} ? $ENV{theme} : "openSUSE";
 
   die "Don't know theme \"$theme\"\n" unless exists $ConfigData{ini}{"Theme 
$theme"};
 
@@ -762,10 +963,16 @@
   $product_name = $ConfigData{ini}{"Theme $theme"}{product};
   my $full_product_name = $product_name;
   $full_product_name .= (" " . $ConfigData{ini}{"Theme $theme"}{version}) if 
$ConfigData{ini}{"Theme $theme"}{version};
+
+  my $suse_release = $ConfigData{ini}{"Theme $theme"}{version};
+  my $sle_release = "sle" . $ConfigData{ini}{"Theme $theme"}{sle};
+  my $sles_release = "sles" . $ConfigData{ini}{"Theme $theme"}{sle};
+  my $sled_release = "sled" . $ConfigData{ini}{"Theme $theme"}{sle};
+
   $update_dir = $ConfigData{ini}{"Theme $theme"}{update};
   $update_dir =~ s/<sles>/$sles_release/g;
   $update_dir =~ s/<sled>/$sled_release/g;
-  $update_dir =~ s/<rel>/$rel/g;
+  $update_dir =~ s/<rel>/$suse_release/g;
   $update_dir =~ s/<arch>/$realarch/g;
   $load_image = $ConfigData{ini}{"Theme $theme"}{image};
   $load_image = $load_image * 1024 if $load_image;
@@ -777,6 +984,9 @@
   $ConfigData{full_product_name} = $full_product_name;
   $ConfigData{update_dir} = $update_dir;
   $ConfigData{load_image} = $load_image;
+  $ConfigData{suse_release} = $suse_release;
+  $ConfigData{sles_release} = $sles_release;
+  $ConfigData{sled_release} = $sled_release;
 
   $ConfigData{min_memory} = $ConfigData{ini}{"Theme $theme"}{memory};
 
@@ -796,9 +1006,6 @@
   if(!$ENV{silent}) {
     my ($r, $kmp);
 
-    $r = $ConfigData{suse_release};
-    $r .= " $ConfigData{suse_xrelease}" if $ConfigData{suse_xrelease};
-
     if($ConfigData{kmp_list}) {
       $kmp = ' (' . join(', ', map { $_ .= "-kmp" } (split(',', 
$ConfigData{kmp_list}))) . ')';
     }
@@ -806,7 +1013,7 @@
       $kmp = "";
     }
 
-    print "--- Building for $product_name $r $ConfigData{arch} 
[$ConfigData{lib}] ($sles_release,$sled_release), theme $ConfigData{theme}\n";
+    print "--- Building for $product_name $suse_release $ConfigData{arch} 
($sle_release) [$ConfigData{lib}], theme $ConfigData{theme}\n";
     print "--- Kernel: $ConfigData{kernel_rpm}$kmp, $ConfigData{kernel_img}, 
$ConfigData{kernel_ver}\n";
 
     $r = $ConfigData{suse_base};


++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++



Remember to have fun...

-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to