FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > CRUX > CRUX

 
 
LinkBack Thread Tools
 
Old 10-24-2010, 12:08 PM
Moritz Wilhelmy
 
Default Fwd: pkg-get rsync support?

Dear list,

I asked Simone Rota if he'd be interested in implementing rsync support for
pkg-get, with the following result, which sure looks good to me, but I didn't
get around to test it yet. I thought someone else might be interested too, so
here it is:

Best regards,

Moritz

--- Begin forwarded message from Simone Rota ---
From: Simone Rota
To: Moritz Wilhelmy
Date: Sat, 23 Oct 2010 14:48:30 +0200
Subject: Re: pkg-get rsync support?

On 10/21/2010 09:16 PM, Moritz Wilhelmy wrote:
>> I don't see a big advantage over http
> I don't think there is one

Oh well :-)

I attach a diff file that should make pkg-get support
rsync repositories, valid urls are something like:

pkgdir /my/packages/java|rsync://server.com::test1
pkgdir /my/packages/one|rsync://server.com::test2/one

so server-side it's both ok to use separate rsync modules or
dirs inside a module

Warnings:

- Mostly untested
- The rsync output on package download is a bit verbose

I no longer have access to the crux git repositories so
if the patch works for you, you may ask some core
maintainer to update the script (and maybe the docs/changelog)
and prepare a new pkg-get release.

Regards,
Simone
_______________________________________________
CRUX mailing list
CRUX@lists.crux.nu
http://lists.crux.nu/mailman/listinfo/crux
 
Old 10-25-2010, 02:45 PM
Jose V Beneyto
 
Default Fwd: pkg-get rsync support?

On 10/24/10 14:08, Moritz Wilhelmy wrote:

Dear list,




Hello Moritz,




I asked Simone Rota if he'd be interested in implementing rsync support for
pkg-get, with the following result, which sure looks good to me, but I didn't
get around to test it yet. I thought someone else might be interested too, so
here it is:
[...]



I also adopted pkg-get and played not long ago
with it, and did a patch for pkg-repgen to avoid having
'prt-get' hardcoded and also to pass a prtdir as an optional
switch, and thus not having to use the system 'prt-get.conf'
(which is useful in some scenarios).

I attached the patch too.



Best regards,



--
Jose V Beneyto | http://sepen.mine.nu/



--- /usr/bin/pkg-repgen 2010-09-02 11:02:43.000000000 +0200
+++ pkg-repgen 2010-09-02 11:41:54.000000000 +0200
@@ -13,8 +13,9 @@ use warnings;
use strict;
use Getopt::Long;

+our $prtget = "/usr/bin/prt-get"; our $prtdir;
our $title = "CRUX Packages"; our $header; our $footer;
-GetOptions("title=s"=>$title, "header=s"=>$header, "footer=s"=>$footer);
+GetOptions("prtdir=s"=>$prtdir, "title=s"=>$title, "header=s"=>$header, "footer=s"=>$footer);

if ($#ARGV >= 0) { # single packages
pkgrepo_single();
@@ -22,6 +23,9 @@ if ($#ARGV >= 0) { # single packages
pkgread();
pkginst();
} else {
+ if ($prtdir) {
+ $prtget = "$prtget --no-std-config --config-set="prtdir $prtdir"";
+ }
pkgrepo();
pkgdeps();
pkgread();
@@ -40,7 +44,7 @@ sub pkgdeps_single {
my $found = 0;
my $package = $packages[0];
$package =~ s/#.*//;
- my $deps = `prt-get printf "%e" --filter="$package"`;
+ my $deps = `$prtget printf "%e" --filter="$package"`;
if ($deps ne "") {
my $isnew = `grep "$p .*:" PKGDEPS`;
if ($isnew eq ""){ # package is new, put deps at the end.
@@ -74,10 +78,10 @@ sub pkgrepo_single {
my $du = (-s $package);
my $md5 = `md5sum $package`;
$md5 =~ s/ .*$|
//g;
- my $des=`prt-get printf %d --filter="$name"`;
+ my $des=`$prtget printf %d --filter="$name"`;
$des =~ s/:/ /g;
if ($des eq ""){$des = "N.A."};
- my $flags=`prt-get printf %E:%O:%R --filter="$name"`;
+ my $flags=`$prtget printf %E:%O:%R --filter="$name"`;
if ($flags eq "") {$flags = "no:no:no"}
my $isnew = `grep "$p#" PKGREPO`;
if ($isnew eq ""){ # package is new, put it at the end
@@ -107,7 +111,7 @@ sub pkgdeps {
open (my $fh, '>PKGDEPS');
foreach my $package (@packages) {
$package =~ s/#.*//;
- my $deps = `prt-get printf "%e" --filter="$package"`;
+ my $deps = `$prtget printf "%e" --filter="$package"`;
if ($deps ne "") {
printf $fh "%-30s : %-s
", $package, $deps;
}
@@ -133,10 +137,10 @@ sub pkgrepo {
my $du = (-s $package);
my $md5 = `md5sum $package`;
$md5 =~ s/ .*$|
//g;
- my $des=`prt-get printf %d --filter="$name"`;
+ my $des=`$prtget printf %d --filter="$name"`;
$des =~ s/:/ /g;
if ($des eq ""){$des = "N.A."};
- my $flags=`prt-get printf %E:%O:%R --filter="$name"`;
+ my $flags=`$prtget printf %E:%O:%R --filter="$name"`;
if ($flags eq "") {$flags = "no:no:no"}
printf $fh "%-s:%-s:%-s:%-s:%-s
", $package,$du,$md5,$des,$flags;
my $version = $package;
@@ -167,7 +171,7 @@ sub pkgread {
print $fh "# README files for repository. Do NOT remove this line.
";
foreach my $package (@packages) {
$package =~ s/#.*//;
- my $path = `prt-get path $package`;
+ my $path = `$prtget path $package`;
$path =~ s/
//g;
if (-f "$path/README"){
print $fh "##### PKGREADME: $package
";
@@ -195,7 +199,7 @@ sub pkginst {
my @packages = glob("*#*.pkg.tar.gz");
foreach my $package (@packages) {
$package =~ s/#.*//;
- my $path = `prt-get path $package`;
+ my $path = `$prtget path $package`;
$path =~ s/
//g;
my $normal= $package;
$normal =~ s/[^[:alnum:]]/_/g;
_______________________________________________
CRUX mailing list
CRUX@lists.crux.nu
http://lists.crux.nu/mailman/listinfo/crux
 

Thread Tools




All times are GMT. The time now is 03:38 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org