Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Akabei frontend
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
8
Issues
8
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
0
Merge Requests
0
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chakra
Akabei
Akabei frontend
Commits
44aafcd1
Commit
44aafcd1
authored
Apr 04, 2011
by
Lukas Appelhans
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Put all the -S stuff in... make actual text-options work
parent
cfa33eb6
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
69 additions
and
8 deletions
+69
-8
apm.cpp
apm.cpp
+2
-1
apm.h
apm.h
+16
-3
main.cpp
main.cpp
+50
-1
queryoperation.cpp
queryoperation.cpp
+1
-3
No files found.
apm.cpp
View file @
44aafcd1
...
...
@@ -19,10 +19,11 @@
#include <QCoreApplication>
#include <QTimer>
APM
::
APM
(
OperationType
type
,
QList
<
Operation
>
operations
,
QStringList
args
,
QObject
*
parent
)
APM
::
APM
(
OperationType
type
,
QList
<
Operation
>
operations
,
Q
MultiHash
<
Operation
,
QString
>
options
,
Q
StringList
args
,
QObject
*
parent
)
:
QObject
(
parent
),
m_operationType
(
type
),
m_operations
(
operations
),
m_options
(
options
),
m_args
(
args
)
{
...
...
apm.h
View file @
44aafcd1
...
...
@@ -33,8 +33,8 @@ public:
ShowChangelog
,
ShowInstalledAsDeps
,
ShowInstalledExplicitely
,
ShowPackagesOfGroup
,
ShowInformation
,
ShowPackagesOfGroup
,
//Also in Sync
ShowInformation
,
//Also in Sync
CheckFiles
,
ShowLocal
,
ShowOwner
,
...
...
@@ -44,10 +44,22 @@ public:
ShowUpgradeable
,
ShowLess
,
///Sync operations
AsDeps
,
AsExplicit
,
RemoveOldPackages
,
RemoveAllPackages
,
SkipDependencyCheck
,
Force
,
ListRepo
,
Search
,
DownloadOnly
,
OnlyNeeded
,
Ignore
,
IgnoreGroup
,
UpdateDatabases
,
UpdateSystem
};
explicit
APM
(
OperationType
type
,
QList
<
Operation
>
operations
,
QStringList
args
,
QObject
*
parent
=
0
);
explicit
APM
(
OperationType
type
,
QList
<
Operation
>
operations
,
Q
MultiHash
<
Operation
,
QString
>
options
,
Q
StringList
args
,
QObject
*
parent
=
0
);
virtual
~
APM
();
private
slots
:
...
...
@@ -57,6 +69,7 @@ private slots:
private:
OperationType
m_operationType
;
QList
<
Operation
>
m_operations
;
QMultiHash
<
Operation
,
QString
>
m_options
;
QStringList
m_args
;
};
...
...
main.cpp
View file @
44aafcd1
...
...
@@ -49,6 +49,20 @@ int main(int argc, char** argv)
options
.
add
(
"R"
,
ki18n
(
"Remove operation"
));
options
.
add
(
"S"
,
ki18n
(
"Sync operation"
));
options
.
add
(
"asdeps"
,
ki18n
(
"Install all packages as non-explicit"
));
options
.
add
(
"asexplicit"
,
ki18n
(
"Install all packages as explicit"
));
options
.
add
(
"c"
,
ki18n
(
"Remove old packages from cache"
));
options
.
add
(
"cc"
,
ki18n
(
"Remove all packages from cache"
));
options
.
add
(
"d"
,
ki18n
(
"Skip dependency check"
));
options
.
add
(
"f"
,
ki18n
(
"Force installation. Overwrite file conflicts"
));
options
.
add
(
"g"
,
ki18n
(
"Show all packages in a group"
));
options
.
add
(
"i"
,
ki18n
(
"Show package information"
));
options
.
add
(
"l"
,
ki18n
(
"List all packages of a specific repository"
));
options
.
add
(
"s"
,
ki18n
(
"Searches repositories for a word"
));
options
.
add
(
"w"
,
ki18n
(
"Downloads packages without installing or upgrading them"
));
options
.
add
(
"needed"
,
ki18n
(
"Up-to-date packages are not reinstalled"
));
options
.
add
(
"ignore <package>"
,
ki18n
(
"Ignores a certain package. Can be used more than once."
));
options
.
add
(
"ignoregroup <group>"
,
ki18n
(
"Ignores upgrade of a group"
));
options
.
add
(
"y"
,
ki18n
(
"Refresh database"
));
options
.
add
(
"u"
,
ki18n
(
"Update system"
));
...
...
@@ -72,6 +86,7 @@ int main(int argc, char** argv)
QList
<
APM
::
Operation
>
list
;
APM
::
OperationType
type
=
APM
::
NoType
;
QMultiHash
<
APM
::
Operation
,
QString
>
opts
;
if
(
args
->
isSet
(
"D"
))
{
type
=
APM
::
DatabaseOperationType
;
...
...
@@ -107,10 +122,44 @@ int main(int argc, char** argv)
type
=
APM
::
RemoveOperationType
;
}
else
if
(
args
->
isSet
(
"S"
))
{
type
=
APM
::
SyncOperationType
;
if
(
args
->
isSet
(
"asdeps"
))
list
.
append
(
APM
::
AsDeps
);
if
(
args
->
isSet
(
"asexplicit"
))
list
.
append
(
APM
::
AsExplicit
);
if
(
args
->
isSet
(
"c"
))
list
.
append
(
APM
::
RemoveOldPackages
);
if
(
args
->
isSet
(
"cc"
))
list
.
append
(
APM
::
RemoveAllPackages
);
if
(
args
->
isSet
(
"d"
))
list
.
append
(
APM
::
SkipDependencyCheck
);
if
(
args
->
isSet
(
"f"
))
list
.
append
(
APM
::
Force
);
if
(
args
->
isSet
(
"g"
))
list
.
append
(
APM
::
ShowPackagesOfGroup
);
if
(
args
->
isSet
(
"i"
))
list
.
append
(
APM
::
ShowInformation
);
if
(
args
->
isSet
(
"l"
))
list
.
append
(
APM
::
ListRepo
);
if
(
args
->
isSet
(
"s"
))
list
.
append
(
APM
::
Search
);
if
(
args
->
isSet
(
"w"
))
list
.
append
(
APM
::
DownloadOnly
);
if
(
args
->
isSet
(
"needed"
))
list
.
append
(
APM
::
OnlyNeeded
);
if
(
args
->
isSet
(
"y"
))
list
.
append
(
APM
::
UpdateDatabases
);
if
(
args
->
isSet
(
"u"
))
list
.
append
(
APM
::
UpdateSystem
);
QStringList
ignore
=
args
->
getOptionList
(
"ignore"
);
if
(
!
ignore
.
isEmpty
())
{
foreach
(
const
QString
&
ign
,
ignore
)
opts
.
insert
(
APM
::
Ignore
,
ign
);
}
QStringList
ignoreGroup
=
args
->
getOptionList
(
"ignoregroup"
);
if
(
!
ignoreGroup
.
isEmpty
())
{
foreach
(
const
QString
&
ign
,
ignoreGroup
)
opts
.
insert
(
APM
::
IgnoreGroup
,
ign
);
}
}
else
if
(
args
->
isSet
(
"U"
))
{
type
=
APM
::
UpgradeOperationType
;
}
else
{
...
...
@@ -126,7 +175,7 @@ int main(int argc, char** argv)
args
->
clear
();
// Free up some memory
APM
apm
(
type
,
list
,
rest
);
APM
apm
(
type
,
list
,
opts
,
rest
);
return
app
.
exec
();
}
queryoperation.cpp
View file @
44aafcd1
...
...
@@ -22,8 +22,6 @@
#include <QFile>
#include <QDir>
//TODO: Make the -p stuff work!
QueryOperation
::
QueryOperation
(
QObject
*
parent
)
:
QObject
(
parent
)
{
...
...
@@ -36,7 +34,7 @@ QueryOperation::~QueryOperation()
}
void
QueryOperation
::
start
(
QList
<
APM
::
Operation
>
operations
,
QStringList
args
)
{
{
//TODO: Make it all only query the local database
if
(
operations
.
contains
(
APM
::
ShowInformation
))
{
if
(
args
.
isEmpty
())
return
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment