On Fri, Sep 19, 2003 at 02:54:23PM -0500, Vinod Kutty wrote:
> 
> Hi,

Vinod,

> I was testing updating an openpkg 1.2 instance on Solaris 9. The RPMs were
> built on Solaris 8.

> 1. Notice that the echo statements use "solaris2.8" but the curl renames
> the output using the string 'solaris2.9'. It shouldn't break anything in
> this case, but is that intentional?

Echo and the first argument to curl specify the name of the package,
i.e. the filename/url as denoted in the index. Since the files
were built on Solaris 8 they carry solaris2.8 in their name.

The second argument to curl specifies the destination path to a local
binary RPM. This is the same path that would be used when building
the package locally from the source. Since the local RPM is configured
for solaris2.9 that's also what the filename includes.

The logic should be correct.


> 2. The curl fails. Removing "-s" reveals a "malformed <url>" error, which
> I resolved by prepending "file://" to the pathname in the saved output
> from openpkg build. The openpkg man page says "-r" can take a directory
> path for the repository, so I'm assuming this is a bug. Is this fixed in a
> newer release ?

It's a bug and prepending file:// is the correct thing to do.

Here is an (untested) patch...

--- openpkg-build.pl.dist       Fri Sep 19 23:30:11 2003
+++ openpkg-build.pl    Fri Sep 19 23:38:20 2003
@@ -2165,7 +2165,7 @@
 #
 sub print_list1 ($$$$$$$) {
     my($list,$c,$uncond,$with,$ignore,$usebin,$allbin) = @_;
-    my($spkg,$bpkg,$ppkg);
+    my($spkg,$bpkg,$ppkg,$cpkg);
     my($mywith, $opt);
     my($cmd1, $cmd2, $mark);
 
@@ -2215,7 +2215,9 @@
                         npriv("$RPM$opt --makeproxy $ppkg").
                         " )";
             } elsif (defined $_->{prefix}) {
-                $cmd1 = npriv("$CURL -q -s -o $bpkg $spkg");
+                $cpkg = $spkg;
+                $cpkg = 'file://'.$cpkg unless $cpkg =~ /^\w+:/;
+                $cmd1 = npriv("$CURL -q -s -o $bpkg $cpkg");
             } else {
                 $cmd1 = npriv("$RPM$opt --rebuild $spkg");
             }

Greetings,
-- 
                                Michael van Elst
Internet: [EMAIL PROTECTED]
                                "A potential Snark may lurk in every tree."
______________________________________________________________________
The OpenPKG Project                                    www.openpkg.org
User Communication List                      [EMAIL PROTECTED]

Reply via email to