Changeset 1621 in ProjectBuilder for devel/pb/bin
- Timestamp:
- Jun 2, 2012, 7:06:12 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
devel/pb/bin/pb
r1612 r1621 1892 1892 # Get list of packages to build 1893 1893 my $ptr = pb_get_pkg(); 1894 @pkgs = @$ptr; 1894 my @pkgs = (); 1895 @pkgs = @$ptr if (defined $ptr); 1895 1896 1896 1897 # Get the running distro to consider 1897 1898 $pbos = pb_distro_get_context($v); 1898 1899 1900 my $pkg = { }; 1899 1901 # Get content saved in cms2build 1900 my ($pkg) = pb_conf_read("$ENV{'PBDESTDIR'}/$ENV{'PBPROJVER'}-$ENV{'PBPROJTAG'}.pb","pbpkg"); 1901 $pkg = { } if (not defined $pkg); 1902 if ((defined $ENV{'PBDESTDIR'}) && (defined $ENV{'PBPROJVER'}) && (defined $ENV{'PBPROJTAG'}) && (-f "$ENV{'PBDESTDIR'}/$ENV{'PBPROJVER'}-$ENV{'PBPROJTAG'}.pb")) { 1903 ($pkg) = pb_conf_read("$ENV{'PBDESTDIR'}/$ENV{'PBPROJVER'}-$ENV{'PBPROJTAG'}.pb","pbpkg"); 1904 $pkg = { } if (not defined $pkg); 1905 } 1902 1906 1903 1907 pb_mkdir_p("$ENV{'PBBUILDDIR'}") if (! -d "$ENV{'PBBUILDDIR'}"); … … 1928 1932 } 1929 1933 # Adds conf file for availability of conf elements 1930 pb_conf_add("$ENV{'PBROOTDIR'}/$ENV{'PBPROJ'}.pb") ;1934 pb_conf_add("$ENV{'PBROOTDIR'}/$ENV{'PBPROJ'}.pb") if ((defined $ENV{'PBROOTDIR'}) && (-f "$ENV{'PBROOTDIR'}/$ENV{'PBPROJ'}.pb")); 1931 1935 } 1932 1936 my ($rbsconf,$testver,$delivery) = pb_conf_get_if($conf,"testver","delivery"); … … 2037 2041 my $repodir = $tdir; 2038 2042 $repodir =~ s|^$remdir/||; 2043 my $repotag = ""; 2044 $repotag = "-$delivery->{$ENV{'PBPROJ'}}" if ($delivery->{$ENV{'PBPROJ'}} ne ""); 2039 2045 2040 2046 my ($pbrepo) = pb_conf_get("pbrepo"); … … 2056 2062 print PBS "set -x\n" if ($pbdebug gt 1); 2057 2063 print PBS << "EOF"; 2058 cat > $ENV{'PBPROJ'} .repo << EOT2059 [$ENV{'PBPROJ'} ]2064 cat > $ENV{'PBPROJ'}$repotag.repo << EOT 2065 [$ENV{'PBPROJ'}$repotag] 2060 2066 name=$pbos->{'name'} $pbos->{'version'} $pbos->{'arch'} - $ENV{'PBPROJ'} Vanilla Packages 2061 2067 baseurl=$pbrepo->{$ENV{'PBPROJ'}}/$repodir … … 2087 2093 print PBS << "EOF"; 2088 2094 # Prepare a script to ease urpmi setup 2089 cat > $ENV{'PBPROJ'} .addmedia << EOT2090 urpmi.addmedia $ENV{'PBPROJ'} $pbrepo->{$ENV{'PBPROJ'}}/$repodir with media_info/hdlist.cz2095 cat > $ENV{'PBPROJ'}$repotag.addmedia << EOT 2096 urpmi.addmedia $ENV{'PBPROJ'}$repotag $pbrepo->{$ENV{'PBPROJ'}}/$repodir with media_info/hdlist.cz 2091 2097 EOT 2092 2098 chmod 755 $ENV{'PBPROJ'}.addmedia … … 2118 2124 # Cf: http://de.opensuse.org/1-Klick-Installation/ISV 2119 2125 # 2120 cat > $ENV{'PBPROJ'} .ymp << EOT2126 cat > $ENV{'PBPROJ'}$repotag.ymp << EOT 2121 2127 <?xml version="1.0" encoding="utf-8"?> 2122 2128 <!-- vim: set sw=2 ts=2 ai et: --> … … 2124 2130 <group><!-- The group of software, typically one for project-builder.org --> 2125 2131 <name>$ENV{'PBPROJ'} Bundle</name> <!-- Name of the software group --> 2126 <summary>Software bundle for the $ENV{'PBPROJ'} project</summary> <!--This message is shown to the user and should describe the whole bundle -->2127 <description>This is the summary of the $ENV{'PBPROJ'} Project2132 <summary>Software bundle for the $ENV{'PBPROJ'}$repotag project</summary> <!--This message is shown to the user and should describe the whole bundle --> 2133 <description>This is the summary of the $ENV{'PBPROJ'}$repotag Project 2128 2134 2129 2135 Details are available on a per package basis below … … 2133 2139 <repositories><!-- List of needed repositories --> 2134 2140 <repository> 2135 <name>$ENV{'PBPROJ'} Repository</name> <!-- Name of the repository -->2136 <summary>This repository contains the $ENV{'PBPROJ'} project packages.</summary> <!-- Summary of the repository -->2137 <description>This repository contains the $ENV{'PBPROJ'} project packages.</description><!-- This description is shown to the user -->2141 <name>$ENV{'PBPROJ'}$repotag Repository</name> <!-- Name of the repository --> 2142 <summary>This repository contains the $ENV{'PBPROJ'}$repotag project packages.</summary> <!-- Summary of the repository --> 2143 <description>This repository contains the $ENV{'PBPROJ'}$repotag project packages.</description><!-- This description is shown to the user --> 2138 2144 <url>$pbrepo->{$ENV{'PBPROJ'}}/$repodir</url><!--URL of repository, which is added --> 2139 2145 </repository> … … 2145 2151 name=`rpm -q --qf '%{NAME}' \$p` 2146 2152 desc=`rpm -q --qf '%{description}' \$p` 2147 cat >> $ENV{'PBPROJ'} .ymp << EOT2153 cat >> $ENV{'PBPROJ'}$repotag.ymp << EOT 2148 2154 <item> 2149 2155 <name>\$name</name><!-- Name of the package, is shown to the user and used to identify the package at the repository --> … … 2153 2159 EOT 2154 2160 done 2155 cat >> $ENV{'PBPROJ'} .ymp << EOT2161 cat >> $ENV{'PBPROJ'}$repotag.ymp << EOT 2156 2162 </software> 2157 2163 </group> 2158 2164 </metapackage> 2159 2165 EOT 2160 chmod 644 $ENV{'PBPROJ'} .ymp2166 chmod 644 $ENV{'PBPROJ'}$repotag.ymp 2161 2167 EOF 2162 2168 } … … 2177 2183 #!/bin/bash 2178 2184 # Prepare a script to ease apt setup 2179 cat > $ENV{'PBPROJ'} .sources.list << EOT2185 cat > $ENV{'PBPROJ'}$repotag.sources.list << EOT 2180 2186 deb $rpd $pbos->{'version'} $projcomponent 2181 2187 deb-src $rpd $pbos->{'version'} $projcomponent 2182 2188 EOT 2183 chmod 644 $ENV{'PBPROJ'} .sources.list2189 chmod 644 $ENV{'PBPROJ'}$repotag.sources.list 2184 2190 2185 2191 # Up two levels to deal with the dist dir cross versions … … 2194 2200 Archive: unstable 2195 2201 Component: $projcomponent 2196 Origin: $ENV{'PBPROJ'} 2197 Label: $ENV{'PBPROJ'} dev repository $pbrepo->{$ENV{'PBPROJ'}}2202 Origin: $ENV{'PBPROJ'}$repotag 2203 Label: $ENV{'PBPROJ'}$repotag dev repository $pbrepo->{$ENV{'PBPROJ'}} 2198 2204 EOT 2199 2205 … … 4207 4213 my @pkgs = (); 4208 4214 4215 # In script actions that file may not exist. 4216 return(\@pkgs) if ((not defined $ENV{'PBDESTDIR'}) || (not defined $ENV{'PBPROJVER'}) || (not defined $ENV{'PBPROJTAG'}) || (! -f "$ENV{'PBDESTDIR'}/$ENV{'PBPROJVER'}-$ENV{'PBPROJTAG'}.pb")); 4217 4209 4218 my ($var) = pb_conf_read("$ENV{'PBDESTDIR'}/$ENV{'PBPROJVER'}-$ENV{'PBPROJTAG'}.pb","pbpkg"); 4210 @pkgs = keys %$var ;4211 4212 pb_log(0,"Packages: ".join(',',@pkgs)."\n") ;4219 @pkgs = keys %$var if (defined $var); 4220 4221 pb_log(0,"Packages: ".join(',',@pkgs)."\n") if (@pkgs); 4213 4222 return(\@pkgs); 4214 4223 }
Note:
See TracChangeset
for help on using the changeset viewer.