summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/unsupported/oipkg/package.cpp23
1 files changed, 15 insertions, 8 deletions
diff --git a/noncore/unsupported/oipkg/package.cpp b/noncore/unsupported/oipkg/package.cpp
index 7aaa240..1054a1d 100644
--- a/noncore/unsupported/oipkg/package.cpp
+++ b/noncore/unsupported/oipkg/package.cpp
@@ -57,5 +57,5 @@ void Package::init( PackageManagerSettings *s )
Package::Package( QStringList pack, PackageManagerSettings *s , QObject *parent, const char *name )
: QObject(parent,name)
-{
+{
init(s);
parsePackage( pack );
@@ -64,5 +64,5 @@ Package::Package( QStringList pack, PackageManagerSettings *s , QObject *parent,
Package::Package( QString n, PackageManagerSettings *s, QObject *parent, const char *name )
: QObject(parent,name)
-{
+{
init(s);
if ( !QFile::exists( n ) )
@@ -119,5 +119,5 @@ void Package::setValue( QString n, QString t )
// }else if ( n == "Size")
// {
-//
+//
// }else if ( n == "MD5Sum")
// {
@@ -386,5 +386,5 @@ void Package::setDest( QString d )
void Package::setOn()
{
- _toProcess = true;
+ _toProcess = true;
}
@@ -402,6 +402,13 @@ void Package::setLink(bool b)
void Package::parseIpkgFile( QString file)
{
- system("tar xzf "+file+" -C /tmp");
- system("tar xzf /tmp/control.tar.gz -C /tmp");
+// 20020830
+// a quick hack to make oipkg understand the new ipk format
+// neu: ar pf PACKAGE control.tar.gz | tar xfOz - ./control > /tmp/control
+ if (! system("ar pf "+file+" control.tar.gz | tar xfOz - ./control > /tmp/control") )
+ {
+//#old tar ipk format
+ system("tar xzf "+file+" -C /tmp");
+ system("tar xzf /tmp/control.tar.gz -C /tmp");
+ }
QFile f("/tmp/control");
if ( f.open(IO_ReadOnly) )
@@ -416,5 +423,5 @@ void Package::parseIpkgFile( QString file)
parsePackage( pack );
}
-
+
}
@@ -437,5 +444,5 @@ void Package::setName(QString n)
QDict<QString>* Package::getFields()
{
- return &_values;
+ return &_values;
}