summaryrefslogtreecommitdiff
path: root/noncore/unsupported/oipkg/package.cpp
Unidiff
Diffstat (limited to 'noncore/unsupported/oipkg/package.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/unsupported/oipkg/package.cpp54
1 files changed, 44 insertions, 10 deletions
diff --git a/noncore/unsupported/oipkg/package.cpp b/noncore/unsupported/oipkg/package.cpp
index 1705f78..9f602b5 100644
--- a/noncore/unsupported/oipkg/package.cpp
+++ b/noncore/unsupported/oipkg/package.cpp
@@ -11,4 +11,10 @@ Package::~Package()
11 11
12Package::Package() 12Package::Package( PackageManagerSettings *s )
13{ 13{
14 init(s);
15}
16
17void Package::init( PackageManagerSettings *s )
18{
19 settings = s;
14 _size = ""; 20 _size = "";
@@ -21,7 +27,8 @@ Package::Package()
21 _status = ""; 27 _status = "";
28 _dest = "";
22} 29}
23 30
24Package::Package( QStringList pack ) 31Package::Package( QStringList pack, PackageManagerSettings *s )
25 { 32 {
26 Package(); 33 init(s);
27 parsePackage( pack ); 34 parsePackage( pack );
@@ -30,5 +37,5 @@ Package::Package( QStringList pack )
30 37
31Package::Package( QString n ) 38Package::Package( QString n, PackageManagerSettings *s )
32 { 39 {
33 Package(); 40 init(s);
34 _name = QString( n ); 41 _name = QString( n );
@@ -39,3 +46,3 @@ Package::Package( Package *pi )
39{ 46{
40 Package(); 47 init(pi->settings);
41 copyValues( pi ); 48 copyValues( pi );
@@ -174,3 +181,3 @@ void Package::copyValues( Package* pack )
174 181
175QString Package::getSection() 182QString Package::section()
176{ 183{
@@ -192,3 +199,3 @@ void Package::setSection( QString s)
192 199
193QString Package::getSubSection() 200QString Package::subSection()
194{ 201{
@@ -255,3 +262,2 @@ QString Package::details()
255 262
256/** No descriptions */
257void Package::processed() 263void Package::processed()
@@ -259,3 +265,3 @@ void Package::processed()
259 _toProcess = false; 265 _toProcess = false;
260 //hack, but we're mot writing status anyway... 266 //hack, but we're not writing status anyway...
261 if ( installed() ) _status = "install"; 267 if ( installed() ) _status = "install";
@@ -263 +269,29 @@ void Package::processed()
263} 269}
270
271QString Package::dest()
272{
273 if ( installed()||(!installed() && _toProcess) )
274 return _dest!=""?_dest:settings->getDestinationName();
275 else return "";
276}
277
278void Package::setDest( QString d )
279{
280 _dest = d;
281}
282
283void Package::setOn()
284{
285 _toProcess = true;
286}
287
288bool Package::link()
289{
290 if ( _dest == "root" || (!installed() && !_toProcess) ) return false;
291 return _link;
292}
293
294void Package::setLink(bool b)
295{
296 _link = b;
297}